package dp.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.PlatformTransactionManager;

import dp.dao.GenericDao;
import dp.dao.JdbcTemplate;

/**
 *
 * @author chensh
 */
public abstract class BaseService {
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
    
    @Autowired(required=false)
    protected GenericDao dao;
    @Autowired(required=false)
    protected JdbcTemplate jdbcTemplate;
	@Autowired(required=false)
    protected PlatformTransactionManager txManager;

    public void setDao(GenericDao dao) {
        this.dao = dao;
    }
    
    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}
    
    public void setTxManager(PlatformTransactionManager txManager)
    {
      this.txManager = txManager;
    }
}
